package com.cucn.eduorder.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author KouChaoJie
 * @since: 2021/10/13 19:02
 */
@Component
public class ConstantWxUtils implements InitializingBean {
    @Value("${wx.open.app_id}")
    private String appId;

    @Value("${wx.open.app_partner}")
    private String appPartner;

    @Value("${wx.open.partnerkey}")
    private String partnerKey;

    @Value("${wx.open.notifyurl}")
    private String notifyUrl;

    public static String WX_OPEN_APP_ID;
    public static String WX_OPEN_APP_PARTNER;
    public static String WX_OPEN_PARTNERKEY;
    public static String WX_OPEN_NOTIFYURL;

    @Override
    public void afterPropertiesSet() throws Exception {
        WX_OPEN_APP_ID = appId;
        WX_OPEN_APP_PARTNER = appPartner;
        WX_OPEN_PARTNERKEY = partnerKey;
        WX_OPEN_NOTIFYURL = notifyUrl;
    }
}
